﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace Model
{
    [Serializable]
    public partial class Sys5a11
    {
		private string _prolistid;
		private string _fmid;
		private string _columname;
		private string _ppt1;
		private string _ppt2;
		private string _ppt3;
		private string _ppt4;
		
        /// <summary>
        /// 主键
        /// </summary>
		public string Prolistid
		{
			get { return _prolistid;	 }
			set { _prolistid=value;	}
		}
        /// <summary>
        /// 方案
        /// </summary>
		public string Fmid
		{
			get { return _fmid;	 }
			set { _fmid=value;	}
		}
        /// <summary>
        /// 字读
        /// </summary>
		public string Columname
		{
			get { return _columname;	 }
			set { _columname=value;	}
		}
        /// <summary>
        /// 属性1
        /// </summary>
		public string Ppt1
		{
			get { return _ppt1;	 }
			set { _ppt1=value;	}
		}
        /// <summary>
        /// 属性2
        /// </summary>
		public string Ppt2
		{
			get { return _ppt2;	 }
			set { _ppt2=value;	}
		}
        /// <summary>
        /// 属性3
        /// </summary>
		public string Ppt3
		{
			get { return _ppt3;	 }
			set { _ppt3=value;	}
		}
        /// <summary>
        /// 属性4
        /// </summary>
		public string Ppt4
		{
			get { return _ppt4;	 }
			set { _ppt4=value;	}
		}
		
		public static List<Sys5a11> GetSys5a11ListByDataTable(DataTable dt)
		{
			if(dt == null) return null;
		    List<Sys5a11> list = new List<Sys5a11>();
		   
			foreach(DataRow dr in dt.Rows)
            {
				Sys5a11 model = GetSys5a11ByDataRow(dr);
				if(null == model) continue;
				
				list.Add(model);
            }
           return list;
		}
		
		public static Sys5a11 GetSys5a11ByDataRow(DataRow dr)
		{
			Sys5a11 model = new Sys5a11(); //实例化Sys5a11
	
			DataColumnCollection dcc = dr.Table.Columns;

			if (dcc.Contains("prolistid")&&!(dr["prolistid"] is System.DBNull))  
				model.Prolistid = ( string)dr["prolistid"];
			if (dcc.Contains("fmid")&&!(dr["fmid"] is System.DBNull))  
				model.Fmid = ( string)dr["fmid"];
			if (dcc.Contains("columname")&&!(dr["columname"] is System.DBNull))  
				model.Columname = ( string)dr["columname"];
			if (dcc.Contains("ppt1")&&!(dr["ppt1"] is System.DBNull))  
				model.Ppt1 = ( string)dr["ppt1"];
			if (dcc.Contains("ppt2")&&!(dr["ppt2"] is System.DBNull))  
				model.Ppt2 = ( string)dr["ppt2"];
			if (dcc.Contains("ppt3")&&!(dr["ppt3"] is System.DBNull))  
				model.Ppt3 = ( string)dr["ppt3"];
			if (dcc.Contains("ppt4")&&!(dr["ppt4"] is System.DBNull))  
				model.Ppt4 = ( string)dr["ppt4"];
			
			return model;
		}
    }
}
